package com.bokee.archerwq.lab.pjo;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

/**
 * 1003, Hangover 684K 341MS Java 538B 2007-11-26 20:49:58
 * 
 * @author wangqiang
 * 
 */
public class Hangover_1003_AC {

	@SuppressWarnings({ "unchecked", "rawtypes" })
	public static void main(String[] args) throws Exception {
		// read input
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		List list = new ArrayList();
		while (true) {
			String line = br.readLine();
			if (line.equals("0.00")) {
				break;
			}
			list.add(line);
		}

		// compute and output
		for (int i = 0; i < list.size(); i++) {
			String param = (String) list.get(i);
			System.out.println(getResult(param) + " card(s)");
		}
	}

	// compute the minimum number of cards necessary to achieve an overhang of
	// at least c card lengths
	private static int getResult(final String param) {
		float c = Float.parseFloat(param);
		int n = 1;
		while (true) {
			float temp = 0.00f;

			for (int i = 2; i <= n + 1; i++) {
				temp += 1 / (i * 1.00f);
			}

			if (temp >= c) {
				return n;
			}

			n++;
		}
	}

}
